<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="lianjie.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<form name="fm">
			<%
				String id = request.getParameter("student_id");
				String delete_username = "";
				String password = "";
				String kind = "";
				String sex = "";
				String tel = "";
				session.setAttribute("ID", id);

				String select_sql = "select * from usermassage where ID = '" + id + "'";
				ResultSet rs1 = stmt.executeQuery(select_sql);
				if (!rs1.next()) {
					out.print("该学生不存在");
					response.setHeader("Refresh", "2;URL=delete_student.jsp");
				} else {
					id = rs1.getString("ID");
					username = rs1.getString("username");
					password = rs1.getString("password");
					kind = rs1.getString("kind");
					sex = rs1.getString("sex");
					tel = rs1.getString("tel");
				%>
		<table width="70%" border="1" cellpadding="3" cellspacing="0">
			<tr>
				<th width="20%">ID</th>
				<th width="20%">username</th>
				<th width="20%">password</th>
				<th width="20%">kind</th>
				<th width="20%">sex</th>
				<th width="20%">tel</th>
			</tr>
				<tr>
					<td><%=id%></td>
					<td><%=username%></td>
					<td><%=password%></td>
					<td><%=kind%></td>
					<td><%=sex%></td>
					<td><%=tel%></td>
				</tr>
		</table>
		<div align="center">
			<br>
			<br>
			<br> <input type="submit" name="delete" id="delete" value="删除"
				onClick="delete_confirm()" style="font-size: 30px; font-family:"微软雅黑">
			<input type="submit" name="delete1" id="delete1" value="返回"
				onClick="back_b()" style="font-size: 30px; font-family:"微软雅黑">
		</div>
				<%
					}
				%>
	</form>
</body>
<script>
	function delete_confirm() {
		if (!confirm("确认删除?")) {
			return;
		}
		document.fm.method = "post";
		document.fm.action = "delete_student_do_check.jsp";

	}
	function back_b() {
		document.fm.action = "delete_student.jsp";

	}
</script>
</html>